public class PlayerAIState_Offense_Shoot : State<PlayerAI>
{
	public static PlayerAIState_Offense_Shoot instance;

	private PlayerAIState_Offense_Shoot()
	{
	}

	public static PlayerAIState_Offense_Shoot getInstance()
	{
		if (instance == null)
		{
			instance = new PlayerAIState_Offense_Shoot();
		}
		return instance;
	}

	public override void enter(PlayerAI owner)
	{
		base.enter(owner);
		owner.player.do_shoot();
		owner.offense_shoot_is_rebound = false;
	}

	public override void fixedUpdate(PlayerAI owner)
	{
		base.fixedUpdate(owner);
		if (Instance<Ball>.instance.isDunk)
		{
			if (owner.player.isInState(PlayerStateBehavior_Idle.getInstance()))
			{
				owner.do_defense_defense();
			}
		}
		else if (!owner.offense_shoot_is_rebound)
		{
			owner.offense_shoot_is_rebound = true;
			if (Instance<Ball>.instance.isInState(BallState_Rebound.getInstance()) && MathHelper.isInPercent(owner.player.team.percent_be_blocked_jump))
			{
				owner.do_offense_grabrebound();
			}
		}
	}
}
